<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>javascript study</title>
    </head>
    <body>
       
        <script >
        var car = "Fiat";
        var car = {type:"Fiat",model:500,color:"white"};
        var person = {firstName:"John", lastName:"Doe", age:50};
        var str = "visit my home";
        // var n = str.search(/home/);
        // var str = "visit my home";
        // var n = str.search("home");
        var str = "visit my home\nmy home";
        var text = str.replace(/my/g, "your");
        alert(text);
        </script>
    </body>
</html>